Have the vif scripts expect the offline event, not the remove event. With
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 15 Nov 2005 14:56:47 +0000 (15:56 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 15 Nov 2005 14:56:47 +0000 (15:56 +0100)
the remove event, the script environment variable has disappeared, so we must
hook on the offline event instead.  This fix was put into xen-backend.rules,
but not the vif scripts, so they were out of sync, and the interfaces were not
being properly closed down.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/examples/vif-bridge
tools/examples/vif-common.sh
tools/examples/vif-nat
tools/examples/vif-route

index c4bac8244ce8f24387f4862f35e0645dabbd149f..7c8219b9ca1be2ee2945c707aa55b9319ad6f918 100755 (executable)
@@ -60,7 +60,7 @@ case "$command" in
         ifconfig "$vif" up || fatal "ifconfig $vif up failed"
         ;;
 
-    remove)
+    offline)
         # vifs are auto-removed from bridge.
         ifconfig "$vif" down || fatal "ifconfig $vif down failed"
         ;;
index fe3e6c67d1457c40b1b7bc2fedee526f4c6b13ba..9a0640b701d24d8241d9804b61c5668291e23511 100644 (file)
@@ -32,7 +32,7 @@ then
 fi
 
 case "$command" in
-    add | offline)
+    add | remove)
         exit 0
         ;;
 esac
index 8933285620461897f0409166c5a7bd6714ed5aff..a9cf3db424d698b9599b1a96efe6ac8bdd2eafa4 100644 (file)
@@ -45,7 +45,7 @@ case "$command" in
         echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
         ipcmd='a'
         ;;
-    remove)
+    offline)
         ifconfig ${vif} down
         ipcmd='d'
         ;;
index 21bc4b18d737f3e6cfd674c0aa1a03ac6f4d2f3b..cb46a782383401760dc830cba1d3b53d0770bb38 100755 (executable)
@@ -31,7 +31,7 @@ case "$command" in
         echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp
         ipcmd='a'
         ;;
-    remove)
+    offline)
         ifdown ${vif}
         ipcmd='d'
         ;;